package bean;

import java.util.List;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Table(name = "Sector")
public class SectorBean {
	
	@Id
	private int idSector;
	
	private String Nombre;
	
	@ManyToMany
	@JoinTable(	name="MozoxSalon",
	      		joinColumns=@JoinColumn(name="idSector"),
	      		inverseJoinColumns=@JoinColumn(name="idEmpleado")
			)
	private List<EmpleadoBean> Mozos;
	  
	@OneToMany
	@JoinColumn(name = "idSector")
	private List<MesaBean> Mesas;
	
	@OneToOne
	@JoinColumn(name = "idArea")
	private AreaBean salon;
	
	
	
	public int getIdSector() {
		return idSector;
	}
	public void setIdSector(int idSector) {
		this.idSector = idSector;
	}
	public String getNombre() {
		return Nombre;
	}
	public void setNombre(String nombre) {
		Nombre = nombre;
	}
	public List<EmpleadoBean> getMozos() {
		return Mozos;
	}
	public void setMozos(List<EmpleadoBean> mozos) {
		Mozos = mozos;
	}
	public List<MesaBean> getMesas() {
		return Mesas;
	}
	public void setMesas(List<MesaBean> mesas) {
		Mesas = mesas;
	}
	public void setSalon(AreaBean salon) {
		this.salon = salon;
	}
	public AreaBean getSalon() {
		return salon;
	}
	
	
	

}
